using UnityEngine;

public class HitBoxForPlayer : MonoBehaviour
{
	public Player SCRT_Player;

	private AttackInfo attackInfo;

	private void OnTriggerEnter2D(Collider2D collision)
	{
		attackInfo = collision.GetComponent<AttackInfo>();
		switch (collision.tag)
		{
		case "AttackZone":
			SCRT_Player.Damaged(collision.transform.position, attackInfo);
			break;
		case "FreezingZone":
			SCRT_Player.Damaged(collision.transform.position, attackInfo);
			SCRT_Player.SetFreezingTIme(attackInfo.time);
			break;
		}
	}
}
